(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))

Rewrite Strategy: FULL

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))

S is empty.
Rewrite Strategy: FULL

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

TRS:
Rules:
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))

Types:
and :: true:false → true:false → true:false
true :: true:false
false :: true:false
if :: true:false → if → if → if
add :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
first :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
from :: 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_if2_0 :: if
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
add, first, from

(6) Obligation:

TRS:
Rules:
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))

Types:
and :: true:false → true:false → true:false
true :: true:false
false :: true:false
if :: true:false → if → if → if
add :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
first :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
from :: 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_if2_0 :: if
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(x))

The following defined symbols remain to be analysed:
add, first, from

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
add(gen_0':s5_0(n8_0), gen_0':s5_0(b)) → gen_0':s5_0(+(n8_0, b)), rt ∈ Ω(1 + n80)

Induction Base:
add(gen_0':s5_0(0), gen_0':s5_0(b)) →RΩ(1)
gen_0':s5_0(b)

Induction Step:
add(gen_0':s5_0(+(n8_0, 1)), gen_0':s5_0(b)) →RΩ(1)
s(add(gen_0':s5_0(n8_0), gen_0':s5_0(b))) →IH
s(gen_0':s5_0(+(b, c9_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(8) Complex Obligation (BEST)

(9) Obligation:

TRS:
Rules:
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))

Types:
and :: true:false → true:false → true:false
true :: true:false
false :: true:false
if :: true:false → if → if → if
add :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
first :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
from :: 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_if2_0 :: if
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons

Lemmas:
add(gen_0':s5_0(n8_0), gen_0':s5_0(b)) → gen_0':s5_0(+(n8_0, b)), rt ∈ Ω(1 + n80)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(x))

The following defined symbols remain to be analysed:
first, from

(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
first(gen_0':s5_0(n599_0), gen_nil:cons6_0(n599_0)) → gen_nil:cons6_0(n599_0), rt ∈ Ω(1 + n5990)

Induction Base:
first(gen_0':s5_0(0), gen_nil:cons6_0(0)) →RΩ(1)
nil

Induction Step:
first(gen_0':s5_0(+(n599_0, 1)), gen_nil:cons6_0(+(n599_0, 1))) →RΩ(1)
cons(0', first(gen_0':s5_0(n599_0), gen_nil:cons6_0(n599_0))) →IH
cons(0', gen_nil:cons6_0(c600_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(11) Complex Obligation (BEST)

(12) Obligation:

TRS:
Rules:
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))

Types:
and :: true:false → true:false → true:false
true :: true:false
false :: true:false
if :: true:false → if → if → if
add :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
first :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
from :: 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_if2_0 :: if
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons

Lemmas:
add(gen_0':s5_0(n8_0), gen_0':s5_0(b)) → gen_0':s5_0(+(n8_0, b)), rt ∈ Ω(1 + n80)
first(gen_0':s5_0(n599_0), gen_nil:cons6_0(n599_0)) → gen_nil:cons6_0(n599_0), rt ∈ Ω(1 + n5990)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(x))

The following defined symbols remain to be analysed:
from

(13) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol from.

(14) Obligation:

TRS:
Rules:
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))

Types:
and :: true:false → true:false → true:false
true :: true:false
false :: true:false
if :: true:false → if → if → if
add :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
first :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
from :: 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_if2_0 :: if
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons

Lemmas:
add(gen_0':s5_0(n8_0), gen_0':s5_0(b)) → gen_0':s5_0(+(n8_0, b)), rt ∈ Ω(1 + n80)
first(gen_0':s5_0(n599_0), gen_nil:cons6_0(n599_0)) → gen_nil:cons6_0(n599_0), rt ∈ Ω(1 + n5990)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(x))

No more defined symbols left to analyse.

(15) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
add(gen_0':s5_0(n8_0), gen_0':s5_0(b)) → gen_0':s5_0(+(n8_0, b)), rt ∈ Ω(1 + n80)

(16) BOUNDS(n^1, INF)

(17) Obligation:

TRS:
Rules:
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))

Types:
and :: true:false → true:false → true:false
true :: true:false
false :: true:false
if :: true:false → if → if → if
add :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
first :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
from :: 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_if2_0 :: if
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons

Lemmas:
add(gen_0':s5_0(n8_0), gen_0':s5_0(b)) → gen_0':s5_0(+(n8_0, b)), rt ∈ Ω(1 + n80)
first(gen_0':s5_0(n599_0), gen_nil:cons6_0(n599_0)) → gen_nil:cons6_0(n599_0), rt ∈ Ω(1 + n5990)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(x))

No more defined symbols left to analyse.

(18) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
add(gen_0':s5_0(n8_0), gen_0':s5_0(b)) → gen_0':s5_0(+(n8_0, b)), rt ∈ Ω(1 + n80)

(19) BOUNDS(n^1, INF)

(20) Obligation:

TRS:
Rules:
and(true, X) → X
and(false, Y) → false
if(true, X, Y) → X
if(false, X, Y) → Y
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))

Types:
and :: true:false → true:false → true:false
true :: true:false
false :: true:false
if :: true:false → if → if → if
add :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
first :: 0':s → nil:cons → nil:cons
nil :: nil:cons
cons :: 0':s → nil:cons → nil:cons
from :: 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_if2_0 :: if
hole_0':s3_0 :: 0':s
hole_nil:cons4_0 :: nil:cons
gen_0':s5_0 :: Nat → 0':s
gen_nil:cons6_0 :: Nat → nil:cons

Lemmas:
add(gen_0':s5_0(n8_0), gen_0':s5_0(b)) → gen_0':s5_0(+(n8_0, b)), rt ∈ Ω(1 + n80)

Generator Equations:
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
gen_nil:cons6_0(0) ⇔ nil
gen_nil:cons6_0(+(x, 1)) ⇔ cons(0', gen_nil:cons6_0(x))

No more defined symbols left to analyse.

(21) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
add(gen_0':s5_0(n8_0), gen_0':s5_0(b)) → gen_0':s5_0(+(n8_0, b)), rt ∈ Ω(1 + n80)

(22) BOUNDS(n^1, INF)